﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>设置</title>
    <link rel="stylesheet" href="css/style.css?v=1.0">
    <link rel="stylesheet" href="css/index.css?v=1.0">
    <script src="js/jquery-1.8.3.min.js"></script>
    <script src="js/flexible.js?v=1.0"></script>
    <script src="layer-mobile/layer.js?v=1.0"></script>
</head>
    <body>
        <header id="header">
            <div class="back" onclick="closeWin();">
                <img src="image/back.png">
            </div>
            <div class="title">设置</div>
        </header>
        <div class="user">
            <div class="setting">
                <div class="set-list">
                    <ul>
                        <li><span class="fl">当前账户</span><span class="fr set-user"></span></li>
                        <li><span class="fl">账户名称</span><span class="fr set-name"></span></li>
                    </ul>
                </div>
                <div class="hr"></div>
                <div class="set-list">
                    <ul>
                        <li><span class="fl">版本信息</span><span class="fr ">V1.0</span></li>
                        <li><span class="fl">联系我们</span><span class="fr"><a href="mailto:support@yskt.com">support@yskt.com</a></span></li>
                    </ul>
                </div>
            </div>
            
            <button class="layout">退出登录</button>
        </div>
       
    </body>
</html>
<script type="text/javascript">
    $(function () {

        var userid = getUserId();

        if (userid) {
            $('.layout').on('click', function () {
                layer.open({
                    content: '退出登录',
                    btn: '确定',
                    yes: function (index) {
                        reUserId();
                        layer.close(index);
                        window.location.href = "/index.html";
                    }
                });
            })
         }

	    $ajax(
		    url+'getMyBasicInfo.ashx',
		    'get',
		    {userid:userid},
		    function(data){
			    var data = data.data;
                $('.set-user').text(data.userMobile);
                $('.set-name').text(data.userName);
		    },
		    function(data){
                loginRes();
		    }
        )
    })
</script>